<?php
$this->pageTitle = Yii::app()->name;
$this->breadcrumbs=array(
	'包裹查询',
);
include_once('menu.php');
?>
<div style="width:100%; float:left; margin-bottom:10px; text-align:right;">
	<form action="" name="jobForm" id="jobForm" method="get">
	<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="10%" class="td_right"><?=$labels['ShipDate']?>: </td>
			<td width="45%">
				<input type="text" name="s" id="s" value="<?= $search['s'] ?>" readonly="readonly" style="width:100px;" />
				<img onclick="displayCalendar(document.jobForm.s,'yyyy-mm-dd',this)" style="cursor:pointer;" src="images/calendar.png" /> - 
				<input type="text" name="e" id="e" value="<?= $search['e'] ?>" readonly="readonly" style="width:100px;" />
				<img onclick="displayCalendar(document.jobForm.e,'yyyy-mm-dd',this)" style="cursor:pointer;" src="images/calendar.png" />
			</td>
			<td width="12%" class="td_right"><?=$labels['Tracking']?>: </td>
			<td><input type="text" name="Tracking" value="<?php if(isset($search['Tracking']))echo $search['Tracking'];?>" id="Tracking" class="input_size4" /></td>
		</tr>
		<tr>
			<td class="td_right"><?=$labels['ServiceType']?>: </td>
			<td><?php echo CHtml::dropDownList('ServiceType',$search['ServiceType'], Yii::app()->params['serviceTypeSearch'],array('empty'=>array(''=>'请选择'),'class'=>'input_size6'));?></td>
			<td colspan="2" style="text-align:right;"><a style="margin-right:50px;" href="<?=Yii::app()->createUrl('admin/exportShipDetailByDate',$search)?>" target="_blank"><img src="images/down.png" border="0" /></a><a style="margin-right:50px;" href="<?=Yii::app()->createUrl('admin/shipTo')?>"><img src="images/shua.png" border="0" /></a><input type="image" src="images/go.png" name="jobSub" id="jobSub" value="Go" /></td>
		</tr>
	</table>				
		<input type="hidden" name="r" value="admin/shipTo" />
	</form>
</div>
<table cellspacing="0" cellpadding="0" width="100%" class="tbl" style="float:left;">
	<tr class="head">
		<td width="15%"><?php echo $labels['ShippingNumber']; ?></td>
		<td width="30%"><?php echo $labels['Tracking']; ?></td>
		<td width="20%"><?php echo $labels['ServiceType']; ?></td>
		<td width="12%"><?php echo $labels['ShipDate']; ?></td>
		<td width="12%"><?php echo $labels['DeliveryDate']; ?></td>
		<td>详情</td>
	</tr>
	<?php
    $i = 0;
    $cssArr = array(0 => 'even', 1 => 'odd', 2 => 'three');
    foreach ($rowTable as $item) {
        $trClass = $cssArr[$i % 3];
        $i++;
        ?>
	<tr class="<?= $trClass ?>">
		<td>
			<?=$item->ShippingNumber?>
		</td>
		<td>
			<?=$item->Tracking?>
		</td>
		<td>
			<?=$item->ServiceType?>
		</td>
		<td style="text-align:center;">
			<?=$item->ShipDate?>
		</td>
		<td style="text-align:center;">
			<?=$item->DeliveryDate?>
		</td>
		<td style="text-align:center;">
			<a href="<?=Yii::app()->createUrl('admin/shipToDetail',array('tracking'=>$item->Tracking))?>">详情</a>
		</td>
	</tr>
	<?php
    }
    ?>
</table>
<div id="pager" align="center">
<?php  
	$this->widget('CLinkPager',array(  
		'header'=>'',  
		'firstPageLabel' => '<<',
		'lastPageLabel' => '>>',
		'prevPageLabel' => '<',
		'nextPageLabel' => '>',
		'pages' => $pages,  
		'maxButtonCount'=>13  
		));  
?>
</div>